package com.pd.ChainOfResponsibility;

/**
 * Created with IntelliJ IDEA.
 * User: 5
 * Date: 17-2-28
 * Time: 下午1:37
 * To change this template use File | Settings | File Templates.
 */
public class Handler1 extends DefaultHandler implements Handler {
    @Override
    public void doWork(int time) {
        if (time<5){
            System.out.println("小于5结束");
        }else if (handler!=null){
            handler.doWork(time);
        }

    }

}
